var dingDan = document.querySelector(".dingdan");
var payment = document.querySelector(".payment");
var cha = document.querySelector(".cha");
dingDan.addEventListener("click",function() {
	$(payment).fadeIn(200);
})
cha.addEventListener("click",function() {
	$(payment).fadeOut(200);
	
})
//价钱计算
var goodsMoney = 0;
var order = $(".text .order");
order.each(function(index,curVal){
	var price = parseFloat($(this).find(".jine>p").eq(0).find("span").text());
	var num = parseFloat($(this).find(".jine>p").eq(1).find("span").text());
	goodsMoney += price*num;
//	console.log(goodsMoney);
})
$(".invoice .totalMoney").find("span").text(goodsMoney);
var transMoney = parseFloat($(".invoice .transMoney").find("span").text());
var totalMoney = goodsMoney+transMoney;
$(".submit-order >p").find("span").text(totalMoney);
